﻿@using hc.epm.Common;
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <title>工程建设管理系统-@ViewBag.Title</title>
    <!--css start-->
    <link rel="stylesheet" href="/Content/bootstrap.min.css" />
    <link rel="stylesheet" href="/Content/style.css" />
    <link rel="stylesheet" href="/Content/layui-2.1.2/css/layui.css" />
    <link href="/Content/css/main.css" rel="stylesheet" />
    <link href="/Content/bootstrapValidator.css" rel="stylesheet" />
    <link href="~/Content/ztest.css" rel="stylesheet" />
    <style>
        /*去掉bootstrap.min.css验证消息的margin-bottom*/
        .help-block {
            margin-top: 3px;
            margin-bottom: 0;
        }
        /*验证图标样式bootstrap.min.css*/
        .form-horizontal .has-feedback .form-control-feedback {
            top: 0;
            right: 15px;
        }

        .has-success .form-control-feedback {
            color: #3c763d;
        }

        .has-error .form-control-feedback {
            color: #a94442;
        }

        .has-feedback .form-control-feedback {
            position: absolute;
            width: 34px;
            height: 34px;
            line-height: 34px;
            text-align: center;
        }
         .form-control[disabled], .form-control[readonly] {
            background-color: #fff;
        }
    </style>
    <!--css end-->
    <!--js start-->
    <script src="/Scripts/json2.js"></script>

    <script src="/cajs/jquery.min.js" type="text/javascript"></script>
    <script src="/cajs/jquery.cookie.js" type="text/javascript"></script>
    <script src="/cajs/topEsa.min.js" type="text/javascript"></script>
    <script src="/cajs/LoadTCA.js"></script>

    <script src="/Scripts/bootstrap.min.js"></script>
    <script src="/Content/layui-2.1.2/layui.js"></script>
    <script src="/Scripts/global.js"></script>
    <script src="/Scripts/js/common.js"></script>
    <script src="/Content/My97DatePicker/WdatePicker.js"></script>
    <script src="/Scripts/bootstrapValidator.js"></script>
    <script src="/Content/ueditor/ueditor.config.js"></script>
    <script src="/Content/ueditor/ueditor.all.min.js"></script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script src="/Content/ueditor/lang/zh-cn/zh-cn.js"></script>

    <!--控件美化,下拉框和单选框-->
    <link href="~/Content/bootstrap_control/bootstrap-select.min.css" rel="stylesheet" />
    <script src="~/Content/bootstrap_control/bootstrap-select.min.js"></script>
    <link href="~/Content/bootstrap_control/Font-Awesome/css/font-awesome.css" rel="stylesheet" />
    <link href="~/Content/bootstrap_control/build.css" rel="stylesheet" />
    <script>
        //断点续传检测
        function checkUpload(up, file, chunkSize, offset) {
            var os = offset;
            if (file.name && chunkSize) {
                $.ajax({
                    type: "GET",
                    async: false,
                    url: FileContinueURL, //检查是否是断点续传
                    data: {
                        name: file.name,
                        fileSize: file.size,
                        lastModifiedDate: file.lastModifiedDate.getTime()
                    },
                    dataType: 'json',
                    success: function (data) {
                        os = Number(data.size);
                        $("#fileUploadId").val(data.fid);
                    }
                });
            }
            var url = up.settings.url;
            var strIndex = url.indexOf('?fId=');
            if (strIndex > -1) {
                url = url.substring(0, strIndex);
            }
            url = url + '?fId=' + $("#fileUploadId").val();
            var array = new Array(os, url);
            return array;
        }
    </script>

    <script src="/Scripts/plupload_2_1_2/moxie.min.js" type="text/javascript"></script>
    <script src="/Scripts/plupload_2_1_2/plupload.dev.js" type="text/javascript"></script>
    <script src="/Scripts/plupload_2_1_2/zh_CN.js" type="text/javascript" charset="UTF-8"></script>
    <!--[if lt IE 9]>
    <script src="/Scripts/html5shiv.min.js"></script>
    <script src="/Scripts/respond.min.js"></script>
        <![endif]-->
    <!--js end-->

</head>
<body style="background:white;height: 99%;">
    @RenderBody()
    <input type="hidden" id="fileUploadId" />
</body>

<script>

    //权限检查
    $(function () {
        CheckRight();
    });
    function CheckRight() {

        var rightStr
            = ' @(MvcHtmlString.Create(Session[ConstString.RIGHTSSESSION].ToString()))';
        var rights = {};
        if (rightStr != "" && rightStr != "null") {
            rights = JSON.parse(rightStr);
        }
        var rightOperate = $(".checkright");
        //rightOperate.show();
        $.each(rightOperate, function (index, item) {
            var module = $(this).data("module");
            var right = $(this).data("right");
            var mr = module + "_" + right;
            var isCheck = false;
            for (var key in rights) {
                //alert(key); //json对象的key
                //alert(jb[key]); //json对象的值
                var val = rights[key];
                if (mr.toLowerCase() == val.toLowerCase()) {
                    isCheck = true;
                }
            }
            if (isCheck) {
                $(this).show();
            }
        });
    }
</script>

</html>


